import App from "./App";
import * as pinia from "pinia";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
dayjs.locale("zh-cn");

// #ifndef VUE3
import Vue from "vue";
import "./uni.promisify.adaptor";
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
  ...App,
});
app.$mount();

// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
import uviewPlus from "@/uni_modules/uview-plus";
import common from "./utils/commonFn";
export function createApp() {
  const app = createSSRApp(App);
  app.use(uviewPlus);
  app.use(pinia.createPinia());
  app.mixin(common);
  return {
    app,
    pinia,
  };
}
// #endif
